import request from '@/utils/request.js';
import { useTokenStore } from '@/store/token.ts';


export const ArticleCategoryListService = () => {
    // const tokenStore = useTokenStore()
    // const token:string = tokenStore.token;
    // return request.get('/category',{headers:{'Authorization':token}});
    return request.get('/category');
};

export const AddCategoryService = (categoryData: any) => {
    request.post('/category', categoryData);
};


export const UpdateArticleCategory = (CategoryData: any) => {
    return request.put('/category', CategoryData)
}

export const DeleteArticleCategory = (CategoryId: string) => {
    return request.delete('/category?id='+CategoryId)
}
